﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PersonaLibrary.ViewModel.EmployeeNoteLinkViewModel;

namespace PersonaLibrary.Commands.CommandsForTotalItems.Employee
{
	internal sealed class NoteForEmployees : CommandBase
	{
		public override bool CanExecute(object parameter)
		{
			return parameter is IEnumerable<Data.BaseEntity>;
		}

		public override void Execute(object parameter)
		{
			IEnumerable<Data.Employee> employees = ((IEnumerable<Data.BaseEntity>) parameter).Cast<Data.Employee>();
			NoteToEmployees vm = new NoteToEmployees(employees);

			vm.View.Show();
		}
	}
}
